

package jetbrains.buildServer.server.rest.data.locator;

import jetbrains.buildServer.server.rest.data.Locator;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Simple stub to be used when proper dimension definition is not given yet. To be removed after all locators are properly defined.
 */
public class StubDimension implements Dimension {
  private final String myName;
  private final Syntax mySyntax = Syntax.TODO("Unknown syntax");

  public StubDimension(@NotNull String name) {
    myName = name;
  }

  @NotNull
  @Override
  public String getName() {
    return myName;
  }

  @NotNull
  public static StubDimension single() {
    return new StubDimension(Locator.LOCATOR_SINGLE_VALUE_UNUSED_NAME);
  }

  @NotNull
  @Override
  public Syntax getSyntax() {
    return mySyntax;
  }

  @Nullable
  @Override
  public String getDescription() {
    return null;
  }

  @Override
  public boolean isHidden() {
    return false;
  }

  @Override
  public boolean isRepeatable() {
    return false;
  }
}